<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>首页</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/yzl.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/swiper.css"/>

    <!-- Demo styles -->
    <style>
    </style>

</head>
<body>
<div id="app" class="container" v-cloak >
  <div id="blank" class="header" v-cloak>
      <div v-back.tapmode  class="back"></div>
      <span class="title">店主信息</span>
  </div>
  <div class="shop_container" v-if="shopinfo" style="padding-top:60px">
    <div>
      <img :src="shopinfo.shoppic" width="100%">
    </div>
    <div class="shop_info" style="margin-top:20px;border-bottom:1px solid #E6E6E6;padding-bottom:20px">
    <div class="shop-avatar" tapmode v-open-win vurl="shopuser">
      <img :src="shopinfo.shopportrait || '../../image/portrait_moren.png'">
    </div>
    <div class="shop-content">
      <div class="shop-title" v-cloak>{{shopinfo.shopname?shopinfo.shopname:'友人店'}}</div>
      <div class="shop-detail">
        <span style="letter-spacing:2px">在售商品<span style="color:#9d0152;">{{shopinfo.onsalecount}}</span>个&nbsp;&nbsp;<span style="font-size:14px">|</span>&nbsp;&nbsp;顾客<span style="color:#9d0152">{{shopinfo.sub_member_count_bshop}}</span>个</span>
      </div>
    </div>
  </div>
  <div class="shop-user-info" style="font-size:14px">
    <div>
      <span>昵称：</span>
      <span>{{shopinfo.nickname}}</span>
    </div>
    <div>
      <span>编号：</span>
      <span>{{shopinfo.member_code}}</span>
    </div>
    <div>
      <span>邀请码：</span>
      <span>{{shopinfo.invite_code}}</span>
    </div>
    <div>
      <span>性别：</span>
      <span>{{sex}}</span>
    </div>
    <div>
      <span style="float:left">店铺简介：</span>
      <span style="float:left">{{shopinfo.introduction}}</span>
    </div>
  </div>
  </div>
<div>

</div>
</div>
</body>
<script src="../../script/vue.js"></script>
<script src="../../script/api.js"></script>
<script src="../../script/app.js"></script>
<script src="../../script/common.js"></script>
<script src="../../script/url.js"></script>
<script src="../../script/components.js"></script>

<script>

    apiready = function () {
        showProgress();
        setBSImg();
        var data = {
            member_id: getPrefs('member_id')
        };
        var callback = function (ret) {
            var home = ret.content;
            shopinfo = home.shopinfo;
            initApp();
            api.parseTapmode();
        };
        pinet.post(URL.getShopUserrInfo, data, callback);
        addListeners();
    };

    function initApp() {
        vm = new Vue({
            el: "#app",
            data: {
            },
            computed: {
                sex: function () {
                    if (shopinfo.sex == '1') {
                        return '男';
                    } else if (shopinfo.sex == '2') {
                        return '女';
                    } else {
                        return '未知';
                    }
                },
            },
            methods: {

            },
        })
    }
    function addListeners() {
        api.addEventListener({
            name: 'viewappear'
        }, function () {
            onPageStart();
        });

        api.addEventListener({
            name: 'viewdisappear'
        }, function (ret, err) {
            onPageEnd();
        });

        api.addEventListener({
            name: 'keyback'
        }, function (ret, err) {
            onPageEnd();
            api.closeWin();
        });
    }
</script>
</html>
